package com.xuxin.baby.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.blankj.utilcode.util.ActivityUtils;
import com.xuxin.baby.R;
import com.xuxin.baby.base.BaseActivity;
import com.xuxin.baby.utils.ACache;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by xu_xin
 * Created on 2020/11/23 0023
 * 登录引导
 * 第一步选择父母
 */
public class LoginGuideActivity extends BaseActivity {
    @BindView(R.id.title_left)
    ImageView title_left;
    @BindView(R.id.title_right)
    ImageView title_right;
    @BindView(R.id.title_name)
    TextView title_name;
    @BindView(R.id.view_line)
    ImageView view_line;
    private ACache aCache;

    @Override
    public void setContentView() {
        setContentView(R.layout.activity_login_guide);
    }

    @Override
    public void initView() {
        title_left.setVisibility(View.INVISIBLE);
        view_line.setVisibility(View.INVISIBLE);
        title_name.setText("选择角色");
    }

    @Override
    public void initData() {
        aCache = ACache.get(context);
    }

    @Override
    public void onComplete() {

    }

    @Override
    @OnClick({R.id.login_guide_one_dad, R.id.login_guide_one_mom})
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.login_guide_one_dad) {
            Bundle bundle = new Bundle();
            bundle.putBoolean("loginGuide", true);
            bundle.putString("role", "爸爸");
            ActivityUtils.startActivity(bundle, UserDataActivity.class);
            finish();
        } else if (id == R.id.login_guide_one_mom) {
            Bundle bundle = new Bundle();
            bundle.putBoolean("loginGuide", true);
            bundle.putString("role", "妈妈");
            ActivityUtils.startActivity(bundle, UserDataActivity.class);
            finish();
        }
    }
}